home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-10 | 5.4 KB | 210 lines | [TEXT/CWIE] |
- /*
- WEDemoHeaders.pch
-
- A "script" to automatically generate the precompiled header files for the C port of
- the WASTE Demo Application (based upon the MacHeaders.pch script included on the
- CodeWarrior 6 Gold CD).
-
- Just add this file to your project and go!
-
- This file is NOT an original part of the WASTE Demo App (written by Marco Piovanelli),
- but something I added for a little happy functionality. Read on to see why.
-
- - John C. Daub
-
- */
-
- #ifdef __MWERKS__
- #ifdef __cplusplus
- #ifdef powerc
- #pragma precompile_target "WEDemoHeadersPPC++"
- #else
- #pragma precompile_target "WEDemoHeaders68k++"
- #endif
- #else
- #ifdef powerc
- #pragma precompile_target "WEDemoHeadersPPC"
- #else
- #pragma precompile_target "WEDemoHeaders68k"
- #endif
- #endif
- #endif
-
- /*
- There are some things that are not originally part of the WASTE Demo App, but
- when I was originally talking with Marco about porting the demo to C (from Pascal),
- he urged me to add in as much Copland support as possible. So, there's probably
- not 100% Copland support, but this is a start
- */
-
-
- /*
- Let's make sure we use new system calls to ensure (hopefully) better support and
- ease of use for future versions of system software. Besides, WASTE is System 7
- (at least) dependant, so might as well...
- */
-
- #define SystemSixOrLater 1
- #define SystemSevenOrLater 1
- #define SystemSevenFiveOrLater 0
-
- /*
- Due to the ever evolving nature of Macintosh, we're gonna make sure that old routine
- names are not being used (they're obsolete now). You should also be using new
- routine names since the Code Fragment Manager binds system calls by name. See
- ConditionalMacros.h for more info...
- */
-
- #define OLDROUTINENAMES 0
-
- /*
- again, same thing as above...system calls are being moved around, e.g. c2pstr was
- in Strings and is now in TextUtils. Right now, things are set to allow people to
- deal with old stuff, but it's being phased out...so let's make sure we're using
- new stuff (see ConditionalMacros.h for more details)
- */
-
- #define OLDROUTINELOCATIONS 0
-
- /*
- #define STRICT_XXX stuff here, as a step towards Copland happiness
- */
-
-
- #define STRICT_WINDOWS 1
- #define STRICT_CONTROLS 1
- #define STRICT_MENUS 1
-
- /*
- From a suggestion by Dan Crevier, all WASTE preprocessor directives are taken
- care of in here (the precompiled header file). This makes life a little easier
- to deal with. For example, you're working on a bunch of projects that all use
- WASTE, but each project configures WASTE differently (e.g. some support Internet
- Config, some don't).
-
- If you kept changing the #define's in WASTEIntf.h each time you worked on a project,
- it'd get to be tooo much of a pain in the butt. So, in WASTEIntf.h, I've commented
- out all of these #define directives and put them all in here....this way, every
- project can use the same source code. Then, for each customizaztion, you can
- do it in files specific to each project.
- */
-
- #define WASTE_DEBUG 0
- #define WASTE_OBJECTS 1
- #define WASTE_USE_UPPS GENERATINGCFM
- #define WASTE_REDRAW_SPEED 0
- #define WASTE_PIN_SCROLL 0
- #define WASTE_NO_SYNCH 0
- #define WASTE_NO_RO_CARET 0
- #define WASTE_IC_SUPPORT 1
- #define WASTE_OBJECTS_ARE_GLYPHS 0
- #define WASTE_RESOLVE_FONT_DESIGNATORS 1
- #define WASTE_WECALTEXT_DOES_REDRAW 1
-
- /*
- * Required for c-style toolbox glue function: c2pstr and p2cstr
- * the inverse operation (pointers_in_A0) is performed at the end ...
- */
-
- #ifndef powerc
- #pragma pointers_in_D0
- #endif
-
- /*
- * Metrowerks-specific definitions
- *
- * These definitions are commonly used but not in Apple's headers. We define
- * them in our precompiled header so we can use the Apple headers without modification.
- */
-
- #define PtoCstr p2cstr
- #define CtoPstr c2pstr
- #define PtoCString p2cstr
- #define CtoPString c2pstr
-
- #define topLeft(r) (((Point *) &(r))[0])
- #define botRight(r) (((Point *) &(r))[1])
-
- #define TRUE true
- #define FALSE false
-
- /*
- * Basic Apple #includes
- *
- * Any universal headers-based project will very likely want these ones.
- * The #includes are in the proper order, to keep disk scans to a minimum.
- *
- */
-
- #include <ConditionalMacros.h>
- #include <Types.h>
- #include <MixedMode.h>
- #include <QuickdrawText.h>
- #include <Quickdraw.h>
- #include <Memory.h>
- #include <OSUtils.h>
- #include <Events.h>
-
- /*
- * Define GetCurrentA5() if target is 68K mac
- *
- */
-
- #ifndef powerc
- //#include <MixedMode.h>
- long GetCurrentA5(void)
- ONEWORDINLINE(0x200D);
- #endif
-
- /*
- * Additional Apple #includes
- *
- * I'll be sure to put anything WASTE needs here, in proper build order
- *
- */
-
- #include <Errors.h>
- #include <Gestalt.h>
- #include <Fonts.h>
- #include <Finder.h>
- #include <Files.h>
- #include <Resources.h>
- #include <IntlResources.h>
- #include <Script.h>
- #include <TextUtils.h>
- #include <FixMath.h>
- #include <Icons.h>
- #include <ToolUtils.h>
- #include <Processes.h>
- #include <AppleTalk.h>
- #include <Aliases.h>
- #include <EPPC.h>
- #include <Notification.h>
- #include <AppleEvents.h>
- #include <AEObjects.h>
- #include <AERegistry.h>
- #include <TextEdit.h>
- #include <Drag.h>
- #include <Scrap.h>
- #include <Menus.h>
- #include <Controls.h>
- #include <Windows.h>
- #include <Dialogs.h>
- #include <Palettes.h>
- #include <QDOffscreen.h>
- #include <LowMem.h>
- #include <Components.h>
- #include <TextServices.h>
- #include <StandardFile.h>
- #include <DiskInit.h>
-
-
- /*
- * required for c-style toolbox glue function: c2pstr and p2cstr
- * (match the inverse operation at the start of the file ...
- */
-
- #ifndef powerc
- #pragma pointers_in_A0
- #endif
-